package com.client.ClientCuntumer.Config;

import com.api.service.UserServiceI;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.rmi.RmiProxyFactoryBean;

@Configuration
public class RmiCilent {
 @Bean
    public RmiProxyFactoryBean getRmiProxyFactoryBean(){
     RmiProxyFactoryBean rmiProxyFactoryBean=new RmiProxyFactoryBean();
     rmiProxyFactoryBean.setServiceUrl("rmi://127.0.0.1:2002/userService");
     rmiProxyFactoryBean.setServiceInterface(UserServiceI.class);
     return  rmiProxyFactoryBean;
 }
}
